import request from '@/utils/request'
//请求模块级别的前缀
const api_name = '/admin/product'
export default {
    // GET /admin/product/attrInfoList/{category1Id}/{category2Id}/{category3Id}
    //获取三级分类属性列表
    getAttrInfoList({category1Id,category2Id,category3Id}){
        return request({
            url:`${api_name}/attrInfoList/${category1Id}/${category2Id}/${category3Id}`,
            method: 'GET'
        })
    },
    //删除属性 DELETE /admin/product/deleteAttr/{attrId}
    deleteAttr(attrId){
        return request({
            url:`${api_name}/deleteAttr/${attrId}`,
            method: 'DELETE'
        })
    },
    //新增&&修改属性
    //POST /admin/product/saveAttrInfo
    saveAttrInfo(data){
        return request({
            url:`${api_name}/saveAttrInfo`,
            method: 'POST',
            data
        })
    }
}